package com.mk.legoscans2.helpers;

import android.os.Handler;
import android.os.Message;

public class FavoritesScanListActivitAccountDialogOnSelectItemAction implements AccountDialogOnSelectItemAction {

	Handler _handler;
	String _oldAccount;
	
	public FavoritesScanListActivitAccountDialogOnSelectItemAction(Handler handler, String oldAccount) {
		_handler = handler;
		_oldAccount = oldAccount;
	}

	public void invoke(String selectedAccount, boolean store) {
		if(selectedAccount != _oldAccount){
			Message message = new Message();
			message.obj = selectedAccount;
			_handler.sendMessage(message);			
		}
	}
}
